#!/bin/bash


cat >> /etc/hosts << EOF
172.16.36.10 node1
172.16.36.11 node2
172.16.36.12 master1
EOF

yum install -y chrony

sed -i 's/^server/#&/' /etc/chrony.conf

echo server 172.16.36.12 iburst >> /etc/chrony.conf

systemctl enable chronyd && systemctl restart chronyd

chronyc sources